package com.xzqwjw.taskmanager.activity;

import com.xzqwjw.taskmanager.R;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;

public class ActivityResetPassword extends Activity implements OnClickListener {

  @SuppressWarnings("unused")
  private String strDBFile = "";

  private EditText etPsdOld;
  private EditText etPsdNew1;
  private EditText etPsdNew2;
  private Button btnModifyPsd;
  private Button btnResetPsd;
  private Button btnBack;

  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    requestWindowFeature(Window.FEATURE_NO_TITLE);
    setContentView(R.layout.activity_resetpassword);

    Intent objIT = getIntent();
    strDBFile = objIT.getStringExtra("DBFilePath");

    initView();
    initClickEvent();
  }

  private void initView() {
    etPsdOld = (EditText) findViewById(R.id.etPsdOld);
    etPsdNew1 = (EditText) findViewById(R.id.etPsdNew1);
    etPsdNew2 = (EditText) findViewById(R.id.etPsdNew2);
    btnModifyPsd = (Button) findViewById(R.id.btnModifyPsd);
    btnResetPsd = (Button) findViewById(R.id.btnResetPsd);
    btnBack = (Button) findViewById(R.id.btnBack);
  }

  private void initClickEvent() {
    btnModifyPsd.setOnClickListener(this);
    btnResetPsd.setOnClickListener(this);
    btnBack.setOnClickListener(this);
  }

  @Override
  public void onClick(View v) {
    @SuppressWarnings("unused")
    Intent objIT;
    @SuppressWarnings("unused")
    String strPsdOld = "";
    String strPsdNew1 = "";
    String strPsdNew2 = "";
    int id = v.getId();
    if (id == R.id.btnModifyPsd) {
      strPsdOld = etPsdOld.getText().toString();
      strPsdNew1 = etPsdNew1.getText().toString();
      strPsdNew2 = etPsdNew2.getText().toString();

      if (strPsdNew1.equals(strPsdNew2)) {

      } else {

      }

    } else if (id == R.id.btnResetPsd) {
    } else if (id == R.id.btnBack) {
    } else {
    }
  }
}
